\fc0 Q: How can I use a class from a subproject in another project?\
\
A: You can drag any .h file from a subproject into the classes suitcase of another project's nib. From there you can instantiate, and make connections freely.\
\
Q: How can I make connections between objects in my subproject and those in the main project?\
\
A: You can't. You need to make the association in your code. The object that is the nib file's owner should take care of communicating with any other objects (including the owners of other nib files).\
\
See NeXTanswer appkit.699 for more information regarding objects communicating between nib files.\
\
Q: When I modify the definition of a class that is located in a subproject, how do I get InterfaceBuilder to recognize the new outlets or actions? Parse just gives me an error: "Cannot find class definition."\
\
A: This is a limitation of InterfaceBuilder in its current incarnation. Once a class definition (or .h file) has been dropped into the classes suitcase from the Workspace Manager, InterfaceBuilder does not have any idea where the files for that class are located. Therefore, you cannot parse classes from a subproject. You must simply drag the .h file onto the class suitcase again. InterfaceBuilder will then display an alert panel indicating that there are different outlets or actions for that class. Choose "Replace" and the class will change to reflect the changes made to the .h file.\
\
Q: The debugger can't find the source files to my subproject classes. Help!\
\
A: You must notify
\b gdb
\b0 where the subproject files are located. You can accomplish this with the
\b directory
\b0 or
\b idirectory
\b0 commands in
\b gdb
\b0 :\
\
\f3\fs22 (gdb) dir <
\f2\i\fs24 pathname
\f3\i0\fs22 >\
\
\f0\fs28 If you don't want to have to type this every time you invoke
\b gdb
\b0 , place this command in your
\b .gdbinit
\b0 file. See the
\b gdb
\b0 man page for more information.\
\
Q: Is there an easy way to include subproject class definitions in the main project of my application?\
\
A: Yes, there is. When you compile the subproject
\b foo.subproj
\b0 ,
\b
\b0 a .h file for the entire subproject will be created in the main project's directory. You can import this .h file. The name of the .h file, in the case of our example, will be
\b foo.h
\b0 . This file imports all of the class definitions contained in the subproject
\b foo.subproj
\b0 . This may be overkill, especially if you have many classes in your subproject that are not interdependent. If so, you can also include them individually by using the following import command:\
\
\f3\fs22 #import "foo.subproj/FooBar.h\
\f0\fs28 \
Q: When I try to
\b make
\b0 an application containing a subproject, I get the following error:\
A: This is an InterfaceBuilder bug that you'll encounter if your subproject contains no class definition files. Consider whether you really need a subproject in this case. The workaround is to create a dummy class and add its .h and .m files to your subproject. \
\
QA792\
\
Not valid for 1.0 (subprojects were added for 2.0)\